/*
 * Copyright (C) 2005, Velocityme Partnership
 * SearchOthersResponsibilityActionForm.java
 *
 * Created on 10 June 2005, 08:46
 */

package com.velocityme.www.actionforms;

import com.velocityme.interfaces.ContactablePK;
import org.apache.struts.action.*;

/**
 *
 * @author  Robert
 */
public class SearchOthersResponsibilityActionForm extends ActionForm {
    
    private Integer m_nodeId;
    private Integer[] m_contactableIds;
    private Boolean m_includeDescendents;
    
    /** Creates a new instance of SearchOthersResponsibilityActionForm */
    public SearchOthersResponsibilityActionForm() {
    }
    
    public void reset(ActionMapping mapping, javax.servlet.http.HttpServletRequest request) {
        m_contactableIds = new Integer[0];
        m_includeDescendents = new Boolean(false);
   }
    
    public Integer getNodeId() {
        return m_nodeId;
    }
    
    public void setNodeId(Integer nodeId) {
        m_nodeId = nodeId;
    }
    
    public Integer[] getContactableIds() {
        return m_contactableIds;
    }
    
    public void setContactableIds(Integer[] contactableIds) {
        m_contactableIds = contactableIds;
    }
    
    public Boolean getIncludeDescendents() { return m_includeDescendents; }
    public void setIncludeDescendents(Boolean includeDescendents) { m_includeDescendents = includeDescendents; }
    
    public ContactablePK[] getContactablePKs() {
        ContactablePK[] contactablePKs = new ContactablePK[m_contactableIds.length];
        for (int i = 0; i < m_contactableIds.length; i++) {
            contactablePKs[i] = new ContactablePK(m_contactableIds[i]);
        }
        return contactablePKs;
    }
    
}
